#include "fixedsys12.h"
#include <nds.h>

using namespace WoopsiUI;

static const u16 FixedSys12_glyphdata[457] = {
/* '!' */	0x6FFF,0x6606,0x6000,
/* '"' */	0xCF3C,0xC000,0x0000,0x0000,0x0000,
/* '#' */	0x6CDB,0xFB66,0xCDBF,0xB66C,0x0000,0x0000,
/* '$' */	0x30C7,0xB3C1,0x8306,0x0F37,0x8C00,
/* '%' */	0x70D8,0xDA76,0x0C18,0x306E,0x5B1B,0x0E00,
/* '&' */	0x71B3,0x638C,0x1BF3,0x6676,0x0000,0x0000,
/* ''' */	0xFC00,0x0000,
/* '(' */	0x366C,0xCCCC,0x6630,
/* ')' */	0xC663,0x3333,0x66C0,
/* '*' */	0x0001,0xB1CF,0xE71B,0x0000,0x0000,0x0000,
/* '+' */	0x0003,0x0CFC,0xC300,0x0000,0x0000,
/* ',' */	0x0000,0x07EF,0x0000,
/* '-' */	0x0000,0x00FC,0x0000,0x0000,0x0000,
/* '.' */	0x0000,0x07E0,0x0000,
/* '/' */	0x0C31,0x8630,0xC618,0xC300,0x0000,
/* '0' */	0x7B3D,0xF7CF,0xBEF3,0x7800,0x0000,
/* '1' */	0x19FE,0x318C,0x6318,0x0000,
/* '2' */	0x7B3C,0xC318,0xC630,0xFC00,0x0000,
/* '3' */	0x7B3C,0xC338,0x3CF3,0x7800,0x0000,
/* '4' */	0x60C1,0xB366,0xD9BF,0x860C,0x0000,0x0000,
/* '5' */	0xFF0C,0x30F8,0x30C6,0xF000,0x0000,
/* '6' */	0x38C6,0x3ECF,0x3CF3,0x7800,0x0000,
/* '7' */	0xFC31,0x8630,0xC618,0x6000,0x0000,
/* '8' */	0x7B3C,0xFB7B,0x7CF3,0x7800,0x0000,
/* '9' */	0x7B3C,0xF3CD,0xF18C,0x7000,0x0000,
/* ':' */	0x03F0,0x07E0,0x0000,
/* ';' */	0x03F0,0x07EF,0x0000,
/* '<' */	0x0C63,0x18C1,0x8306,0x0C00,0x0000,
/* '=' */	0x0000,0x3F03,0xF000,0x0000,0x0000,
/* '>' */	0xC183,0x060C,0x6318,0xC000,0x0000,
/* '?' */	0x7B3C,0xC630,0xC00C,0x3000,0x0000,
/* '@' */	0x7EC3,0xC3CF,0xDBDB,0xCFC0,0x7F00,0x0000,
/* 'A' */	0x31EC,0xF3CF,0xFCF3,0xCC00,0x0000,
/* 'B' */	0xFB3C,0xF3FB,0x3CF3,0xF800,0x0000,
/* 'C' */	0x7B3C,0xF0C3,0x0CF3,0x7800,0x0000,
/* 'D' */	0xF36C,0xF3CF,0x3CF6,0xF000,0x0000,
/* 'E' */	0xFF0C,0x30FB,0x0C30,0xFC00,0x0000,
/* 'F' */	0xFF0C,0x30FB,0x0C30,0xC000,0x0000,
/* 'G' */	0x7B3C,0xF0C3,0x7CF3,0x7C00,0x0000,
/* 'H' */	0xCF3C,0xF3FF,0x3CF3,0xCC00,0x0000,
/* 'I' */	0xF666,0x6666,0xF000,
/* 'J' */	0x0C30,0xC30C,0x3CF3,0x7800,0x0000,
/* 'K' */	0xCF3D,0xB6F3,0x6DB3,0xCC00,0x0000,
/* 'L' */	0xC30C,0x30C3,0x0C30,0xFC00,0x0000,
/* 'M' */	0xC78F,0xBEBD,0x7AF1,0xE3C6,0x0000,0x0000,
/* 'N' */	0xC78F,0x9FBD,0xF9F1,0xE3C6,0x0000,0x0000,
/* 'O' */	0x7B3C,0xF3CF,0x3CF3,0x7800,0x0000,
/* 'P' */	0xFB3C,0xF3FB,0x0C30,0xC000,0x0000,
/* 'Q' */	0x7B3C,0xF3CF,0x3CF3,0x7860,0xC000,
/* 'R' */	0xFB3C,0xF3FB,0x6CF3,0xCC00,0x0000,
/* 'S' */	0x7B3C,0x1830,0x60F3,0x7800,0x0000,
/* 'T' */	0xFCC3,0x0C30,0xC30C,0x3000,0x0000,
/* 'U' */	0xCF3C,0xF3CF,0x3CF3,0x7800,0x0000,
/* 'V' */	0xCF3C,0xF3CF,0x3CDE,0x3000,0x0000,
/* 'W' */	0xC78F,0x1EBD,0x7ADB,0x366C,0x0000,0x0000,
/* 'X' */	0xCF36,0x8C31,0x6CF3,0xCC00,0x0000,
/* 'Y' */	0xCF3C,0xF378,0xC30C,0x3000,0x0000,
/* 'Z' */	0xFC30,0xC631,0x8C30,0xFC00,0x0000,
/* '[' */	0xFCCC,0xCCCC,0xCCCF,
/* '\' */	0xC306,0x1830,0xC186,0x0C30,0x0000,
/* ']' */	0xF333,0x3333,0x333F,
/* '^' */	0x31EC,0xC000,0x0000,0x0000,0x0000,
/* '_' */	0x0000,0x0000,0x0000,0x0000,0x0000,0xFF00,
/* '`' */	0xE630,0x0000,0x0000,
/* 'a' */	0x0007,0x830D,0xFCF3,0x7C00,0x0000,
/* 'b' */	0xC30F,0xB3CF,0x3CF3,0xF800,0x0000,
/* 'c' */	0x0007,0xB3C3,0x0C33,0x7800,0x0000,
/* 'd' */	0x0C37,0xF3CF,0x3CF3,0x7C00,0x0000,
/* 'e' */	0x0007,0xB3CF,0xFC30,0x7800,0x0000,
/* 'f' */	0x3D86,0x18FD,0x8618,0x6000,0x0000,
/* 'g' */	0x01FC,0xF3CF,0x3CDF,0x0C3F,0x8000,
/* 'h' */	0xC30F,0xB3CF,0x3CF3,0xCC00,0x0000,
/* 'i' */	0x30C0,0x3C30,0xC30C,0x33F0,0x0000,
/* 'j' */	0x18C0,0xF18C,0x6318,0xC630,
/* 'k' */	0xC30C,0xF3DB,0xCDB3,0xCC00,0x0000,
/* 'l' */	0xF0C3,0x0C30,0xC30C,0xFC00,0x0000,
/* 'm' */	0x0003,0xF6BD,0x7AF5,0xEBC6,0x0000,0x0000,
/* 'n' */	0x000F,0xB3CF,0x3CF3,0xCC00,0x0000,
/* 'o' */	0x0007,0xB3CF,0x3CF3,0x7800,0x0000,
/* 'p' */	0x03EC,0xF3CF,0x3CFE,0xC30C,0x0000,
/* 'q' */	0x01FC,0xF3CF,0x3CDF,0x0C30,0xC000,
/* 'r' */	0x000C,0xF7E3,0x0C30,0xC000,0x0000,
/* 's' */	0x0007,0xF0C1,0xE0C3,0xF800,0x0000,
/* 't' */	0x618F,0xD861,0x8618,0x3C00,0x0000,
/* 'u' */	0x000C,0xF3CF,0x3CF3,0x7C00,0x0000,
/* 'v' */	0x000C,0xF3CF,0x3CDE,0x3000,0x0000,
/* 'w' */	0x0003,0x1EBD,0x7AF5,0xB66C,0x0000,0x0000,
/* 'x' */	0x000C,0xF378,0xC7B3,0xCC00,0x0000,
/* 'y' */	0x00CD,0x9B36,0x6CD9,0x9E0C,0x33C0,0x0000,
/* 'z' */	0x000F,0xC318,0xC630,0xFC00,0x0000,
/* '{' */	0x198C,0x6661,0x8631,0x8600,
/* '|' */	0xFFFF,0xFF00,
/* '}' */	0xC318,0xC30C,0xCC63,0x3000,
/* '~' */	0x71DB,0x8E00,0x0000,0x0000,0x0000,0x0000,
/* 0x7F */	0xFFFF,0xFFFF,0xFFFF,0xFC00,0x0000,
};

static const u16 FixedSys12_offset[95] = {
    0,    3,    8,   14,   19,   25,   31,   33,   36,   39,   45,   50,   53,   58,   61,   66,
   71,   75,   80,   85,   91,   96,  101,  106,  111,  116,  119,  122,  127,  132,  137,  142,
  148,  153,  158,  163,  168,  173,  178,  183,  188,  191,  196,  201,  206,  212,  218,  223,
  228,  233,  238,  243,  248,  253,  258,  264,  269,  274,  279,  282,  287,  290,  295,  301,
  304,  309,  314,  319,  324,  329,  334,  339,  344,  349,  353,  358,  363,  369,  374,  379,
  384,  389,  394,  399,  404,  409,  414,  420,  425,  431,  436,  440,  442,  446,  452
};

static const u8 FixedSys12_width[95] = {
 4, 6, 7, 6, 8, 7, 2, 4, 4, 7, 6, 3, 6, 3, 6, 6,
 5, 6, 6, 7, 6, 6, 6, 6, 6, 3, 3, 6, 6, 6, 6, 8,
 6, 6, 6, 6, 6, 6, 6, 6, 4, 6, 6, 6, 7, 7, 6, 6,
 6, 6, 6, 6, 6, 6, 7, 6, 6, 6, 4, 6, 4, 6, 8, 4,
 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 6, 6, 7, 6, 6, 6,
 6, 6, 6, 6, 6, 6, 7, 6, 7, 6, 5, 2, 5, 8, 6
};

FixedSys12::FixedSys12(u8 fixedWidth) : PackedFont1 (
	33,
	127,
	FixedSys12_glyphdata,
	FixedSys12_offset,
	FixedSys12_width,
	12,
	3,
	8,
	8
) {
	if (fixedWidth) setFontWidth(fixedWidth);
};
